<!-- Data Tables -->
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>{:lang('My red bag')}</h5>
                </div>
                <div class="ibox-content">
                    <a href="getredbag.html"><button class="btn btn-danger" type="submit">{:lang('Receive red envelopes')}</button></a>
                </div>
                <div class="ibox-content">
                    <table id="table" data-toggle="gridview" class="table" data-url="{:url('admin/user/getredbaglist')}" data-toolbar="#toolbar" data-show-columns="true" data-page-size="20" data-page-list="[10, 25, 50, All]" data-unique-id="id" data-pagination="true" data-side-pagination="client" data-search="true" data-click-to-select="false">
                        <thead>
                            <tr>
                                <th data-width="50" data-field="weighted" data-align="center">{:lang('Weighted value')}</th>
                                <th data-width="80" data-field="rate" data-align="center">{:lang('interest rate')}</th>
                                <th data-width="80" data-field="dt" data-align="center">{:lang('Date')}</th>
                            </tr>
                        </thead>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>


<script type="text/javascript">

    

    var operateEvents = {
        'click .edit': function (e, value, row, index) {
            var param = {
                url: "{:url('admin/user/edit');}",
                data: {id: row.id}
            }
            $("#table").gridView('loadModal', param.url,param.data)
        },
        'click .delete': function (e, value, row, index) {
            $("#table").gridView('deleteModal', 'delete', row)
            
        }
    };

</script>
